package com.momo.hr.controller.config;

import com.momo.hr.bean.Menu;
import com.momo.hr.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 系统控制器
 */
@RestController
@RequestMapping("/system/config")
public class SystemController {

    @Autowired
    MenuService menuService;

    /**
     * 获取所有的菜单
     * @return
     */
    @GetMapping("/menu")
    public List<Menu> getMenusByHrId(){
        return this.menuService.getMenusByHrId();
    }


}
